package lab01;

public class Test13 {

    public static void main(String[] args) {

        int hundred,ten,bits;

        System.out.println("水仙花数为:");

        int n;

        for( n=100;n<=999;n++){

            hundred=n/100;

            ten=n%100/10;

            bits=n%10;

            if(n==hundred*hundred*hundred+ten*ten*ten+bits*bits*bits){

                System.out.print(n+" ");
            }
        }
    }

}
